<!DOCTYPE html>
<html>
 <head>
 <style>

 #transformed {
 transform: translateY(50px) rotateX(20deg) rotateZ(10deg);
 padding: 10px;
 margin: 15px;
 background-color: Yellow;
 }
 #transformed, #parent {
    width: 600px;
     height: 150px;
 }
 #child1 {
 transform: rotateX(45deg) rotateZ(45deg) translateZ(-500px) translateX(-300px) translateY(-180px);
 height: 30px;
 background-color: Lime;
 }
 #child2 {
 transform: translateZ(-500px) rotateX(-45deg) rotateZ(-45deg) translateX(50px) translateY(-130px);
 height: 30px;
 background-color: Cyan;
 }
 #description {
     margin-top: 210px;
 }

 </style>

 <script src="resources/hit-test-utils.js"></script>
 <script>
 const hitTestData = [
 { 'point': [70, 70], 'target' : 'transformed' },
 { 'point': [630, 130], 'target' : 'transformed' },
 { 'point': [40, 130], 'target' : 'transformed' },
 { 'point': [620, 270], 'target' : 'transformed' },
 { 'point': [130, 100], 'target' : 'child1' },
 { 'point': [200, 110], 'target' : 'child2' }
 ];

 window.addEventListener('load', runTest, false);
 </script>
 </head>
 <body id="body">

 <div id="parent">
 <div id="transformed">transformed
 <div id="child1">child 1</div>
 <div id="nonTransformedChild">non transformed child</div>
 <div id="child2">child 2</div>
 </div>
 </div>

  <p id="description">Checks that hit testing is correct when a transformed element has childs with negative z-offset</p>

 <div id="results"></div>
 </body>
</html>
